{% block sw_condition_value_content %}
<div class="sw-condition-line-item sw-condition__condition-value">
    {% block sw_condition_line_item_field_operator %}
    <sw-condition-operator-select
        v-bind="{ operators, condition }"
        :plural="matchesAll"
        :disabled="disabled || undefined"
    />
    {% endblock %}

    {% block sw_condition_line_item_field_identifier %}
    <sw-entity-multi-select
        entity="product"
        size="medium"
        :disabled="disabled || undefined"
        :entity-collection="products"
        :criteria="productCriteria"
        :context="productContext"
        advanced-selection-component="sw-advanced-selection-product"
        @update:entity-collection="setIds"
    >
        <template #selection-label-property="{ item }">
            <slot
                name="selection-label-property"
                v-bind="{ item }"
            >
                {% block sw_condition_line_item_results_variant_info %}
                <sw-product-variant-info
                    :variations="item.variation"
                >
                    {{ item.translated.name || item.name }}
                </sw-product-variant-info>
                {% endblock %}
            </slot>
        </template>

        <template #result-item="{ item, index, searchTerm, highlightSearchTerm, isSelected }">
            <slot
                name="result-item"
                v-bind="{ item, index, searchTerm, highlightSearchTerm }"
            >
                <sw-select-result
                    :selected="isSelected(item)"
                    v-bind="{ item, index, searchTerm, highlightSearchTerm }"
                >
                    {% block sw_condition_line_item_results_list_result_label %}
                    <span class="sw-select-result__result-item-text">
                        <sw-product-variant-info
                            :variations="item.variation"
                            :highlighted="highlightSearchTerm"
                            :search-term="searchTerm"
                        >
                            {{ item.translated.name || item.name }}
                        </sw-product-variant-info>
                    </span>
                    {% endblock %}
                </sw-select-result>
            </slot>
        </template>
    </sw-entity-multi-select>
    {% endblock %}
</div>
{% endblock %}
